import request from '@/config/axios'


// 动态记录 API
export const DynamicRecordApi = {
  // 查询动态记录分页
  getDynamicRecordPage: async (params) => {
    return await request.get({ url: `/task/dynamic-record/page`, params })
  },

  getDynamicRecordList: async (params) => {
    return await request.get({ url: `/task/dynamic-record/list`, params })
  },
  // 查询动态记录详情
  getDynamicRecord: async (id) => {
    return await request.get({ url: `/task/dynamic-record/get?id=` + id })
  },

  // 新增动态记录
  createDynamicRecord: async (data) => {
    return await request.post({ url: `/task/dynamic-record/create`, data })
  },

  // 修改动态记录
  updateDynamicRecord: async (data) => {
    return await request.put({ url: `/task/dynamic-record/update`, data })
  },

  // 删除动态记录
  deleteDynamicRecord: async (id) => {
    return await request.delete({ url: `/task/dynamic-record/delete?id=` + id })
  },

  // 导出动态记录 Excel
  exportDynamicRecord: async (params) => {
    return await request.download({ url: `/task/dynamic-record/export-excel`, params })
  },
}
